<?php
class Cl_SettingsManager extends WdkManager 
{
	/**
	 * 	생성자
	 */
	function __construct()
	{
		parent::__construct();
		$this->dbo = Wdk::model(basename(__DIR__));
		$this->filter	= array();
		$this->order	= array();
	}
	
	protected function newObj()
	{
		return Wdk::get(basename(__DIR__));
	}
	
	public function loadAll()
	{
		try
		{
			$this->listsize = 99999;
			$this->page = 1;
			parent::load();			
		}
		catch(NoRecordException $e)
		{
			
		}
	}
	
	public function data()
	{
		$settings = array();
		$this->loadAll();
		foreach($this->lists as $data)
		{
			$settings[$data['settings_name']] = $data['settings_value'];
		}
		return $settings;
	}
}